/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */

package db.interfaces;

import core.Book;
import core.Course;
import java.util.Collection;

/**
 *
 * @author Anton
 */
public interface BookDAO
{

    Book getBookById(long id);
    Book getBookByISBN10(String ISBN10);
    Book getBookByISBN13(String ISBN13);

    Collection<Book> searchForBooksByTitle(String beginsWith);
    Collection<Book> searchForBooksByAuthor(String beginsWith);
    Collection<Book> searchForBooksByISBN10(String beginsWith);
    Collection<Book> searchForBooksByISBN13(String beginsWith);
    Collection<Book> searchForBooksByParameters(String beginsWith, String fieldName, boolean asc);
    
    Collection<Book> getBooksByAuthor(String author);
    Collection<Book> getBooksByTitle(String title);
    Collection<Book> getAllBooks();

    Collection<Book> getAllBooksInCourse(Course course);
    
    boolean bookIsBound(Book book);
    boolean containsBook(Book book);
    boolean addBook(Book book);
    boolean editBook(Book book);
    boolean deleteBook(Book book);
}
